package com.lxh.lxhcrm.model.pojos;

import javax.persistence.*;
import java.util.Objects;

/**
 * 交货方式
 */
@Entity
@Table(name="delivery_type",schema = "lxh_crm", catalog = "")
public class DeliveryType {
    private int deliveryId;
    private String deliveryName;

    @Id
    @Column(name = "delivery_id", nullable = false)
    public int getDeliveryId() {
        return deliveryId;
    }

    public void setDeliveryId(int deliveryId) {
        this.deliveryId = deliveryId;
    }

    @Basic
    @Column(name = "delivery_name", nullable = true, length = 40)
    public String getDeliveryName() {
        return deliveryName;
    }

    public void setDeliveryName(String deliveryName) {
        this.deliveryName = deliveryName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DeliveryType that = (DeliveryType) o;
        return deliveryId == that.deliveryId &&
                Objects.equals(deliveryName, that.deliveryName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(deliveryId, deliveryName);
    }
}
